import { _HttpClient } from '@delon/theme';
import { Injectable } from '@angular/core';
import { HttpParams, HttpHeaders } from '@angular/common/http';
import { environment } from '../../../../../environments/environment';

const responseHeaders = new HttpHeaders().set('Content-Type', 'application/json;charset=UTF-8');

@Injectable({ providedIn: 'root' })
export class TctjDayService {
    constructor(private http: _HttpClient,) { }


    /**
     * 查询
     * @param param	String workshop;//车间
     * @param param	String workshopName;//车间
     * @param param	String workarea;//工区
     * @param param	String workareaName;//工区
     * @param param	String station;//车站
     * @param param	String stationName;//车站
     * @param param	String workdateStart;//起始时间
     * @param param	String workdateEnd;//截止时间
     */
    query(param) {
        const dataurl = environment.project + '/skywinStat/dayStat';
        return this.http.post(dataurl, '', param, { headers: responseHeaders });
    }



    /**
     * 展开
     * @param params workdateStart
     * @param params workdateEnd
     * @param params workshop 车间
     * @param params workarea 工区
     */
    expand(params) {
        const dataurl = environment.project + '/skywinStat/dayStatExpand';
        return this.http.post(dataurl, '', params, { headers: responseHeaders });
    }


    /**
     * 查询某一项统计信息详情
     * @param params detailType 明细内容查看类型
     * 施工计划项数A
     * 施工兑现项数B
     * 维修计划项数C
     * 维修兑现项数D
     * 点外今天E
     * 点外明天F
     * 点外总数G
     * @param params workdateStart
     * @param params workdateEnd
     * @param params unit
     */
    detail(params) {
        const dataurl = environment.project + '/skywinStat/dayStatDetail';
        return this.http.post(dataurl, '', params, { headers: responseHeaders });
    }


}
